package com.atguigu.c_changestream;

import java.io.FileInputStream;
import java.io.IOException;
import java.io.InputStreamReader;

public class Demo {
    public static void main(String[] args) throws IOException {
        //创建转换输入流对象
        InputStreamReader isr = new InputStreamReader(
                new FileInputStream("T_Day23\\test\\悯农.txt"),"GBK");


        //循环读
        char[] chs = new char[1024];
        int len;

        while((len = isr.read(chs)) != -1){
            //把字符转换成字符串
            String line = new String(chs, 0, len);
            System.out.print(line);
        }




        isr.close();
    }
}
